package com.linkhub.oms.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.linkhub.oms.common.enums.mp.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 用户资金流水
 * </p>
 *
 * @author Frank
 * @since 2024-05-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("t_user_account_flow")
@ApiModel(value="UserAccountFlowEntity对象", description="用户资金流水")
public class UserAccountFlowEntity implements Serializable {


    @ApiModelProperty(value = "主键")
    @TableId(value = "Fid", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "用户id")
    @TableField("Fuser_id")
    private String userId;

    @ApiModelProperty(value = "交易id")
    @TableField("Ftransaction_id")
    private String transactionId;

    @ApiModelProperty(value = "交易类型： 1-支出 2-收入 3-冻结 4-解冻 ")
    @TableField("Ftransaction_type")
    private TransactionTypeEnum transactionType;

    @ApiModelProperty(value = "是否已解冻（仅冻结状态该标识有效） 0-否 1-是")
    @TableField("Funfreeze_status")
    private FreezeStatusEnum unfreezeStatus;

    @ApiModelProperty(value = "单据id")
    @TableField("Fdocument_id")
    private String documentId;

    @ApiModelProperty(value = "单据类型： 1-提货单 2-订单 3-充值单 4-加工单")
    @TableField("Fdocument_type")
    private DocumentTypeEnum documentType;

    @ApiModelProperty(value = "费用类型： 1-提货费 2-仓储费 3-操作费 4-充值 5-运费 6-加工费 7-VAT手续费 8-VAT增值税 9-挂号费")
    @TableField("Fexpense_type")
    private ExpenseTypeEnum expenseType;

    @ApiModelProperty(value = "金额")
    @TableField("Famount")
    private BigDecimal amount;
    /**
     * 币种默认 USD
     */
    @ApiModelProperty(value = "剩余金额")
    @TableField("Fremaining_balance")
    private BigDecimal remainingBalance;

    @ApiModelProperty(value = "数据状态：1-有效；0-无效")
    @TableField("Fdata_status")
    private DataStatusEnum dataStatus;

    @ApiModelProperty(value = "创建（交易）时间")
    @TableField("Fcreated_time")
    private LocalDateTime createdTime;

    @ApiModelProperty(value = "修改时间")
    @TableField("Fupdate_time")
    private LocalDateTime updateTime;


}
